#ifndef __GLOBAL_H__
#define __GLOBAL_H__

#include <stl/list.h>
//#include <standard/datastore.h>


#define NEWGAME "NEWGAME"
struct SNEWGAMEINFO{
    char m_strNameSpace[32];
    float m_fBlockSize;
    int32 m_nBlockCountX;
    int32 m_nBlockCountY;
    float m_fObjectUnitSize;
    class CEditorSceneMgr* m_pSceneMgr;
};

#define SAVEGAME "SAVEGAME"
struct SSAVEGAMEINFO{
    char m_strFileName[32];
};

#define OPENGAME "OPENGAME"
struct SOPENGAMEINFO{
    char m_strFileName[32];
    char m_strNameSpace[32];
    float m_fBlockSize;
    int32 m_nBlockCountX;
    int32 m_nBlockCountY;
    float m_fObjectUnitSize;
    class CEditorSceneMgr* m_pSceneMgr;
};


#define SETSTATUSCOORDTEXT "SETSTATUSCOORDTEXT"
struct SSETSTATUSCOORDTEXT{
    float m_fPosX, m_fPosY, m_fPosZ;
    int32 m_nCellX, m_nCellY;
};

#define SETSTATUSTEXT "SETSTATUSTEXT"



#define SETTERRAINBRUSHTYPENOTIFICATION "SETTERRAINBRUSHTYPENOTIFICATION"


extern char g_strVersion[32];

extern bool32 g_bIsCtrlDown;
extern bool32 g_bIsShiftDown;


#define STATUS_COORD (0)
#define STATUS_SHIFTKEY (1)
#define STATUS_CTRLKEY (2)
#define STATUS_MEMORY (3)
#define STATUS_OPERATORDESC (4)
#define STATUS_FPS (5)
#define STATUS_FILENAME (6)


#define SETOPERATORTYPE "SETOPERATORTYPE"
enum EOperatorType{
    EOT_NULL,
    EOT_TERRAIN_SURFACE_EDIT,

    EOT_TERRAIN_COLOR_EDIT,

    EOT_TERRAIN_HEIGHT_RISE_EDIT,
    EOT_TERRAIN_HEIGHT_FALL_EDIT,
    EOT_TERRAIN_HEIGHT_FLAT_EDIT,
    EOT_TERRAIN_HEIGHT_STEEP_EDIT,
    EOT_TERRAIN_HEIGHT_SMOOTH_EDIT,

    EOT_OBJECT_EDIT,

    EOT_UNIT_EDIT,

    EOT_HELPER_EDIT,

    EOT_NAVIGATIONMAP_EDIT,
    //EOT_AREA_ADD_EDIT,

    EOT_COUNT,
};


#define SETCOMMANDTYPE "SETCOMMANDTYPE"

#define EDITOR_DELETE "EDITOR_DELETE"


#define SETSCENEVISIBLE "SETSCENEVISIBLE"


#define MAINMENU_OPERATOR "MAINMENU_OPERATOR"



struct SQUERYTERRAINLAYERINFO{
    int m_nBlockID;
    int m_nLayerIndex;
    char m_strTextureName[32];
    int m_nUVScale;
    bool32 m_bVaild;
};

#define QUERYTERRAINLAYERINFO "QUERYTERRAINLAYERINFO"


#define MODIFYTERRAINBLOCKLAYERUVSCALE "MODIFYTERRAINBLOCKLAYERUVSCALE"

#define DELETETERRAINBLOCKLAYER "DELETETERRAINBLOCKLAYER"



#define SELECTOBJECT "SELECTOBJECT"
struct SSELECTOBJECT {
    int32 m_nType;
    int32 m_nSelectTerrainBlockID;
    list<class CSceneObject*>* m_vpSelectSceneObjectList;
};



extern class CCommandMgr* g_pCommandMgr;
extern char g_strResourceWorkPath[256];

#endif
